<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<link href="./jslib/uploadify/uploadify.css" rel="stylesheet" type="text/css" />
<script src="./jslib/jquery/jquery-3.2.1.js" type="text/javascript"></script>
<script src="./jslib/uploadify/jquery.uploadify.js" type="text/javascript"></script>
<script src="./jslib/swfobject.js" type="text/javascript"></script>

<style type="text/css">
#fileQueue {position: absolute;bottom: 0;right: 0;}
</style>

<title>uploadfile.jsp</title>
</head>
<body>

<form id="form1">
spring mvc 上传文件<br>
<div id="fileQueue">
</div>
<input type="file" name="uploadify" id="uploadify" />
<p>
<a href="javascript:$('#uploadify').uploadify('upload','*')">上传</a>|
<a href="javascript:$('#uploadify').uploadify('cancel','*')">取消上传</a>
</p>
</form>
</body>
<script>
$(function(){
	$('#uploadify').uploadify({
		'auto': false,
		'method':'post',
		'swf':'./jslib/uploadify/uploadify.swf',
		'uploader':'./upload/file1.do',
		'buttonText': '上传图片',
		'fileTypeDesc': 'Image Files',
		'fileTypeExts': '*.gif; *.jpg; *.png',
		'formData': { 'someKey': 'someValue'},
		'queueID': 'fileQueue',
		'multi': false
	});
});

</script>
</html>